﻿/******************************************************************
 *Company: http://www.xiaomutech.com/
 *fileName : qcardhand.h --- QCardHand
 *Auth       : yhni (QQ:393320854)
 *Create    : 2022/1/25
 *Description   :
 *Histroy:
 *<Auth>    <Date>        <Ver>        <Content>
 *         2022/1/25
 *******************************************************************/
#ifndef QCARDHAND_H
#define QCARDHAND_H

#include "qcardarea.h"
#include "card_header.h"

class QCard;
class QCardHand
{
public:
    QCardHand();
    QCardHand(HandType type, CardPoint base, int extra);
    QCardHand(QList<QCard*> _cards);

    bool operator == (const QCardHand& hand);
    bool operator > (const QCardHand& other);
public:
    void fromCards(const QList<QCard *>& _cards);
    HandType judgeHand();

    bool canBeat(const QCardHand& other);
    HandType getType();
    CardPoint getBasePoint();
    int getExtra();

protected:
    HandType m_handType;
    CardPoint m_basePoint;
    int m_extra;

    QVector<CardPoint> m_oneCard;
    QVector<CardPoint> m_twoCards;
    QVector<CardPoint> m_threeCards;
    QVector<CardPoint> m_fourCards;
};


#endif // QCARDHAND_H
